num = input("请输入：")
num_pre = num[:2]
if num.isdigit():
    print("true")
elif num_pre == "0b":
    patter_str = "01"
elif num_pre == "0o":
    patter_str = "01234567"
elif num_pre == "0x":
    patter_str = "0123456789abcde"
else:
    print("false")

flag = 0
for num1 in num[2:]:
    if num1 not in patter_str:
        flag = 1
        break
if flag == 0:
    print("true")
else:
    print("false")
